﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace TongJi
{

    [DataContract]
    public class AccountList
    {
        [DataMember(Order = 0)]
        public string gameusername { get; set; }


        public List<AccountList> GetDBS(string str)
        {
            try
            {
                Action<object> log = o => Console.WriteLine(o);
                Func<int, int, int> add = (x, y) => x + y;
                var elementdb = JsonConvert.DeserializeObject<List<AccountList>>(str);

                //log(JArray.Parse(str)); //注意，格式化过的输出

                return elementdb;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                return null;
            }
        }
    }

}
